using Mt.Site.Application.Dto;
using Mt.Site.Application.FileUpload.Dto;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Mt.Site.Application.FileUpload
{
    public interface IFileUploadAppService:IBackEndAppService
    {
        #region Query Info

        /// <summary>
        /// 获取文件信息列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<FileInfoDto>> GetFileInfos(GetFileInfoInput input);

        Task<FileInfoDetailDto> GetFileInfoById(Guid id);

        /// <summary>
        /// 获取文件信息（单个如有多个则获取第一个按照order排序）
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<FileInfoDto> GetFileInfo(GetFileInfoInput input);
        #endregion

        #region 文件库选择文件

        Task<FileInfoDto> UploadFile2(SelectFromLibraryInput input);
        Task<FileInfoDto> SingleUpload2(SelectFromLibraryInput input);

        #endregion

        #region Operate File

        Task UpdateFileInfo(UpFileInfoInput input);

        /// <summary>
        /// 删除文件信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task DeleteFile(DeleteFileInput input);

        Task<FileRenameOut> UpdateFileName(updateFileNameInput input);

        Task SetNewSorNumber(NewFileSortNumberInput input);

        Task SetStatus(SetFileStatusInput input);

        #endregion

        /// <summary>
        /// 获取配置模板信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<FileObjectConfigDto>> GetConfigInfo(UploadConfigInput input);

        Task<FileObjectConfigDto> GetSingleConfigInfo(UploadConfigInput input);
        Task SwapObjectSortAsync(SwapSortNumberInput input);
    }
}
